<?php
class Member_model extends CI_Model
{
	public function validate_login($username, $password)
	{
		$array = array('username'=>$username, 'password'=>md5($password));
		$query = $this->db->get_where('member', $array);
		
		//$query = $this->db->query("select * from member where username='$username' and password='$password';");
		
		if($query->num_rows() > 0)
		{
			foreach ($query->result_array() as $row)
			{
				$data[] = $row;
			}
			return $row;
		}
	}
}